	public function add(){
		if(IS_POST){
		    $data=I('post.'); 
			${$tableName}Model = D('{$TableName}');		
			if (!${$tableName}Model ->create()) {
				$this->ajaxJson(${$tableName}Model->geterror(), 1);
			}		
			$formFieldArr=${$tableName}Model->formFieldDict();
			foreach($formFieldArr as $k=>$v){
	          if($v['inType']=='checkbox' || ($v['inType']=='select' && $v['multiple']==1 && $v['field_comma_split']==1)){
	             if(isset($data[$k])){
			        if(is_array($data[$k]) && count($data[$k])){
			            ${$tableName}Model->$k=implode(',',$data[$k]);
			        }	
	             }
	          }
		    }

			$flag = ${$tableName}Model ->add();
			if($flag){ 
				$this->ajaxJson('新建成功', 0);
			}else{
				$this->ajaxJson('新建失败', 1);
			}
		}else{
			$this->display(); 
		}
	}